<template>
<!--  <el-button type="danger" icon="el-icon-delete" size="mini" @click="delBanner"></el-button>-->
  <DeleteButton @Delete="delBanner"/>
</template>

<script>
import {deleteBanner} from '@/network/applet'
import DeleteButton from "@/components/common/buttons/Delete"
/**
 * @author 太阳当空丶赵
 * @date 2023/1/5-16:59
 * @version 1.0.0
 */
export default {
  name: "DelBanner",
  props: ['bannerId'],
  components: {DeleteButton},
  methods: {
    async delBanner() {
      const {code, msg} = await deleteBanner(this.bannerId)
      if (code === 200) {
        this.alertMessage("删除成功", "success");
        this.$emit("delete")
      } else {
        this.alertMessage(msg, "error");
      }

    }
  }
}
</script>
